Routers or switches in a network are typically responsible for receiving and forwarding packets. Each switch may perform a routing decision for each packet by, for example, performing a lookup into a forwarding table to identify an output port for forwarding the packet. Various routing algorithms have been used by switches or routers to identify an output port for forwarding each packet.